home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16946 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.1 KB  |  51 lines

  1. Newsgroups: comp.lang.c++
  2. Path: in1.uu.net!world!mv!usenet
  3. From: ENGR@GSSI.MV.COM (Michael Furman)
  4. Subject: Re: What are the differences between structures and classes in C++ ?
  5. Message-ID: <DprL5v.H86@mv.mv.com>
  6. Mime-Version: 1.0
  7. Content-Type: Text/Plain; charset=US-ASCII
  8. Organization: GSSI
  9. Date: Fri, 12 Apr 1996 19:37:06 GMT
  10. References: <4k5m65$av@hpscit.sc.hp.com> <316A7639.3383@sto.fdata.se> <DpM37F.Dzp@mv.mv.com> <316B7554.AFE@sto.fdata.se>
  11. X-Newsreader: WinVN 0.99.7
  12. X-Nntp-Posting-Host: gssi.mv.com
  13.  
  14. In article <316B7554.AFE@sto.fdata.se>, niklas.mellin@sto.fdata.se says...
  15. > [....]
  16. >
  17. >I did reread them and I can still not find any one but me coming up with a
  18. >complete and correct answer. Raghuveera Ravinutala asked about the
  19. >differences between structs and classes, and a correct answer is that
  20. >the default access of members AND BASE CLASSES is public in structs and
  21. >private in classes.
  22.  
  23. Ok - I was wrong when I said that you did not read answers carefully: now
  24. I see you did. But you sill not correct (see below). 
  25.  
  26. >No other reply stated that also the base class access is public. And most 
  27. >of them (including yours) even said that the ONLY difference is the default 
  28. >access of the members, which is just wrong. 
  29. >
  30. >There was one reply stating that in structs everything is public by 
  31. >default and in classes everything is private by default, which is 
  32. >technically correct, but not very enlightning.
  33.  
  34.   All what you said (except the last sentence) would be correct if the
  35. question
  36. was an exam or interview question. But it was not. Person who asked this
  37. question did not know a lot about C++. And he/she did not need formal and 
  38. full answer. Mentioning base classes for somebody who does not know what 
  39. class is - is not very enlightening.
  40.  
  41.  
  42. -- 
  43. <<< If you received it by E-mail: it is a copy of post to the newsgroup >>>
  44. ---------------------------------------------------------------
  45. Michael Furman,                       (603)893-1109
  46. Geophysical Survey Systems, Inc.  fax:(603)889-3984
  47. 13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
  48. North Salem, NH 03073-0097            71543.1334@compuserve.com
  49. ---------------------------------------------------------------
  50.  
  51.